package com.xiaoxie.boot.bean;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Book implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "图书ID")
    private Integer id;

    @ApiModelProperty(value = "图书名称")
    private String bookName;

    @ApiModelProperty(value = "图书作者")
    private String author;

    @ApiModelProperty(value = "出版社")
    private String press;

    @ApiModelProperty(value = "书籍编号")
    private String bookNumber;

    @ApiModelProperty(value = "书籍简介")
    private String bookDescription;

    @ApiModelProperty(value = "书籍语言")
    private String bookLanguage;

    @ApiModelProperty(value = "书籍价格")
    private Double bookPrice;

    @ApiModelProperty(value = "出版日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date publicationTime;

    @ApiModelProperty(value = "书籍类型")
    private String typeName;

    @ApiModelProperty(value = "书籍状态:0-未借出1-已借出2-延迟还书3-丢失图书")
    private Integer bookStatus;

}